import React from "react";
import CustCardHeader from "../custCardHeader";
import styless from "@/style/fxq/fxqdata.module.scss"

import Loading from "../loading/loading";
const FxqData = ({
    loading,
    style,
    itemWidth,
    data = [

    ]
}) => {
    return (
        <>
            <div className={styless.card} style={{ ...style }}>
                <Loading loading={loading}>
                    <div className={styless.card_center}>
                        <CustCardHeader hideBtn hideDownBtn hideTitle={false} />


                        <div className={styless.info}>
                            {
                                data.map((item, index) => {
                                    return (
                                        <div className={styless.card} key={index} style={{ width: itemWidth ? itemWidth : null }}>
                                            <div className={styless.Itemcard_center} >
                                                <div className={styless.center_container} >
                                                    <div className={styless.state}>
                                                        {item.value}
                                                    </div>
                                                    <div className={styless.title} >{item.tips}</div>
                                                    <div className={styless.card_title}>
                                                        {item.title}
                                                    </div>
                                                </div>
                                            </div>

                                        </div>
                                    )
                                })
                            }
                        </div>

                    </div>
                </Loading>

            </div>

        </>
    )
}
export default FxqData;